<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <#include "../common.ftl">
</head>
<body class="childrenBody">
<form class="layui-form layuimini-form" style="width:80%;">
    <input name="id" type="hidden" value="${(project.id)!}"/>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label required">项目名</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input projectName"
                   lay-verify="required" name="projectName" id="projectName"  value="${(project.projectName)!}" placeholder="请输入项目名">
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label required">项目描述</label>
        <div class="layui-input-block">
            <textarea type="text" class="layui-textarea projectName"
                   name="projectDesc" id="projectDesc" lay-verify="required"
                      placeholder="请输入项目描述">${(project.projectDesc)!}</textarea>
        </div>
    </div>

<#--    <div class="layui-form-item layui-row layui-col-xs12">-->
<#--        <label class="layui-form-label">项目经理</label>-->
<#--        <div class="layui-input-block">-->
<#--            <input type="text" class="layui-input"-->
<#--                   name="projectLeader" value="${(project.projectLeader)!}"-->
<#--                   id="projectLeader"-->
<#--                   placeholder="请输入项目经理">-->
<#--        </div>-->
<#--    </div>-->

    <div class="layui-form-item layui-row layui-col-xs12 " id="progress" >
        <label class="layui-form-label required">项目进度</label>
        <input name="schedule" type="hidden">
        <div id="schedule" class="demo-slider"}
             style="margin-left: 160px;margin-top: 13px;"></div>
<#--        <div class="layui-progress layui-progress-big" lay-showpercent="true" lay-filter="schedule"-->
<#--             style="margin-left: 150px; margin-top: 10px">-->
<#--            <div class="layui-progress-bar layui-bg-red" lay-percent="${(project.schedule)!}%"></div>-->
<#--        </div>-->
    </div>

    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label required">日期范围</label>
        <div class="layui-inline" id="date">
            <div class="layui-input-inline">
                <input type="text" autocomplete="off"
                       id="beginTime" name="beginTime"
                       class="layui-input" placeholder="开始日期"
                       value="${(beginTime)!}">
            </div>
            <div class="layui-form-mid">-</div>
            <div class="layui-input-inline">
                <input type="text" autocomplete="off"
                       id="endTime" name="endTime"
                       class="layui-input" placeholder="归档日期"
                       value="${(endTime)!}">
            </div>
        </div>
    </div>

<#--    <div class="layui-form-item layui-row layui-col-xs12">-->
<#--        <label class="layui-form-label required">是否公开</label>-->
<#--        <input type="checkbox" id="isPrivate" name="isPrivate" lay-skin="switch">-->
<#--    </div>-->

    <br/>
    <div class="layui-form-item layui-row layui-col-xs12">
        <div class="layui-input-block">
            <button class="layui-btn layui-btn-lg" lay-submit=""
                    lay-filter="addOrUpdateProject">确认
            </button>
            <a class="layui-btn layui-btn-lg layui-btn-normal"  id="closeDlg" href="javascript:void(0)">取消</a>
        </div>
    </div>
</form>


<script type="text/javascript" src="${ctx.contextPath}/public/lib/jquery-3.4.1/jquery-3.4.1.min.js"></script>
<script>
    if($("input[name='id']").val().length === 0) {
        $("#progress").hide();
    }
    let scheduleValue = 0;
    <#if project??>
        scheduleValue = ${project.schedule!};
    </#if>
</script>
<script type="text/javascript" src="${ctx.contextPath}/public/js/project/add.update.js"></script>
</body>
</html>